package com.whuan.socket;

import sun.tools.jar.Main;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class ReadFile {

    public static void main(String[] args){

        String aaa = readFile("E:\\out.txt");
        System.out.println(aaa);
    }
    public static String readFile(String FilePath) {
        BufferedReader br = null;
        String aaa = "";
        String bbb = "";
        try {
            br =new BufferedReader(new FileReader(FilePath));
            aaa= br.readLine();
            while (aaa != null){
                bbb = bbb+ aaa;
                aaa= br.readLine();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bbb;
    }
}
